<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    <title>webpack1指南 | icccc.cc   -   周瑜.com</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="JS模块化编程的发展历程,webpack1， 入门,进阶,loader,集成gulp--missed,jquery引入--missed,ts,vue">
    <meta name="description" content="webpack1指南： https://www.gitbook.com/book/toobug/webpack-guide虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》&amp;lt;gh-pages on github支持一个index.html文件,不提供同re">
<meta name="keywords" content="JS模块化编程的发展历程,webpack1， 入门,进阶,loader,集成gulp--missed,jquery引入--missed,ts,vue">
<meta property="og:type" content="article">
<meta property="og:title" content="webpack1指南">
<meta property="og:url" content="http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/index.html">
<meta property="og:site_name" content="icccc.cc   -   周瑜.com">
<meta property="og:description" content="webpack1指南： https://www.gitbook.com/book/toobug/webpack-guide虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》&amp;lt;gh-pages on github支持一个index.html文件,不提供同re">
<meta property="og:updated_time" content="2017-12-05T08:11:59.536Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="webpack1指南">
<meta name="twitter:description" content="webpack1指南： https://www.gitbook.com/book/toobug/webpack-guide虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》&amp;lt;gh-pages on github支持一个index.html文件,不提供同re">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.6.14">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">doc2git</h5>
          <a href="mailto:ivuex@yahoo.com" title="ivuex@yahoo.com" class="mail">ivuex@yahoo.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/mirrors"  >
                <i class="icon icon-lg icon-home"></i>
                镜像
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/note"  >
                <i class="icon icon-lg icon-sticky-note"></i>
                便签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/things"  >
                <i class="icon icon-lg icon-things"></i>
                计划列表
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                参考链群
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories"  >
                <i class="icon icon-lg icon-categories"></i>
                分类
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/ivuex" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/edit-code-view--pad"  >
                <i class="icon icon-lg icon-read-manual"></i>
                读文档
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
            <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">webpack1指南</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off"
                   placeholder="Search">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <!-- Below lines Added by doc2git -->
        <div class="comments">
            <!--<a id="noteWrap" href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="note">-->
                <!--<i id="noteBtn" style="font-weight:900;" class="icon icon-lg icon-sticky-note-o"></i>-->
            <!--</a>-->
            <!--<div id="stickyNoteWrap" class="global-share"-->
                 <!--style="background-color:transparent; padding:4px 6px; display:flex; justify-content:center box-shadow:0 0 2px 0 rgba(0,0,0,0.16), 0 0px 0px 0 rgba(0,0,0,0.12)">-->
                <!--<iframe-->
                    <!--background="transparent"-->
                    <!--width="252"-->
                    <!--height="290"-->
                    <!--box-sizing="border-box"-->
                    <!--frameborder="0"-->
                    <!--scrolling="no"-->
                    <!--marginheight="0"-->
                    <!--marginwidth="0"-->
                    <!--src='http://localhost:8080/note'>-->
                    <!--style="padding:8px 6px"-->
                <!--</iframe>-->
            <!--</div>-->
        </div>
        <!-- Above lines Added by doc2git -->
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">webpack1指南</h1>
        <h5 class="subtitle">
            
            <time datetime="2017-10-02T00:18:29.349Z" itemprop="datePublished" class="page-time">
  2017-10-02
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/gitbook释出/">gitbook释出</a></li></ul>

            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#webpack1指南：-https-www-gitbook-com-book-toobug-webpack-guide"><span class="post-toc-number">1.</span> <span class="post-toc-text">webpack1指南： https://www.gitbook.com/book/toobug/webpack-guide</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》-lt-gh-pages-on-github支持一个index-html文件-不提供同repo下的资源请求，我目前在摸索快速美观单页repo的高效部署；-又比如《UMD模块打包》，这里面有判断当前宿主js环境规范的经典实现，-编写跨规范js包可以直接拿来用；etc-）。"><span class="post-toc-number">1.0.0.1.</span> <span class="post-toc-text">虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》<gh-pages on github支持一个index.html文件,不提供同repo下的资源请求，我目前在摸索快速美观单页repo的高效部署； 又比如《UMD模块打包》，这里面有判断当前宿主js环境规范的经典实现， 编写跨规范js包可以直接拿来用；etc.）。</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#模块化：-https-webpack-toobug-net-zh-cn-chapter1"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">模块化： https://webpack.toobug.net/zh-cn/chapter1/</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#原始时代：-https-webpack-toobug-net-zh-cn-chapter1-ancient-times-html"><span class="post-toc-number">1.1.0.1.</span> <span class="post-toc-text">原始时代： https://webpack.toobug.net/zh-cn/chapter1/ancient-times.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#命名空间时代：-https-webpack-toobug-net-zh-cn-chapter1-name-spacing-age-html"><span class="post-toc-number">1.1.0.2.</span> <span class="post-toc-text">命名空间时代： https://webpack.toobug.net/zh-cn/chapter1/name-spacing-age.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#模块化时代：-https-webpack-toobug-net-zh-cn-chapter1-modular-age-html"><span class="post-toc-number">1.1.0.3.</span> <span class="post-toc-text">模块化时代： https://webpack.toobug.net/zh-cn/chapter1/modular-age.html</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#wepack入门：-https-webpack-toobug-net-zh-cn-chapter2"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">wepack入门： https://webpack.toobug.net/zh-cn/chapter2/</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#入口文件：-https-webpack-toobug-net-zh-cn-chapter2-entry-point-html"><span class="post-toc-number">1.2.0.1.</span> <span class="post-toc-text">入口文件： https://webpack.toobug.net/zh-cn/chapter2/entry-point.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#非模块化文件打包：https-webpack-toobug-net-zh-cn-chapter2-non-moduler-html"><span class="post-toc-number">1.2.0.2.</span> <span class="post-toc-text">非模块化文件打包：https://webpack.toobug.net/zh-cn/chapter2/non-moduler.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#AMD模块打包：-https-webpack-toobug-net-zh-cn-chapter2-amd-html"><span class="post-toc-number">1.2.0.3.</span> <span class="post-toc-text">AMD模块打包： https://webpack.toobug.net/zh-cn/chapter2/amd.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Node模块和NPM：-https-webpack-toobug-net-zh-cn-chapter2-node-modules-and-npm-html"><span class="post-toc-number">1.2.0.4.</span> <span class="post-toc-text">Node模块和NPM： https://webpack.toobug.net/zh-cn/chapter2/node-modules-and-npm.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#UMD模块打包：-https-webpack-toobug-net-zh-cn-chapter2-umd-html"><span class="post-toc-number">1.2.0.5.</span> <span class="post-toc-text">UMD模块打包： https://webpack.toobug.net/zh-cn/chapter2/umd.html</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#webpack进阶：-https-webpack-toobug-net-zh-cn-chapter3"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">webpack进阶： https://webpack.toobug.net/zh-cn/chapter3/</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#CLI与API使用模式：-https-webpack-toobug-net-zh-cn-chapter3-cli-api-html"><span class="post-toc-number">1.3.0.1.</span> <span class="post-toc-text">CLI与API使用模式： https://webpack.toobug.net/zh-cn/chapter3/cli-api.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#基本配置项：-https-webpack-toobug-net-zh-cn-chapter3-config-html"><span class="post-toc-number">1.3.0.2.</span> <span class="post-toc-text">基本配置项： https://webpack.toobug.net/zh-cn/chapter3/config.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#分片：-https-webpack-toobug-net-zh-cn-chapter3-chunks-html"><span class="post-toc-number">1.3.0.3.</span> <span class="post-toc-text">分片： https://webpack.toobug.net/zh-cn/chapter3/chunks.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#CommonChuncks插件：-https-webpack-toobug-net-zh-cn-chapter3-common-chunks-plugin-html"><span class="post-toc-number">1.3.0.4.</span> <span class="post-toc-text">CommonChuncks插件： https://webpack.toobug.net/zh-cn/chapter3/common-chunks-plugin.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#高级配置项：-https-webpack-toobug-net-zh-cn-chapter3-advanced-config-html"><span class="post-toc-number">1.3.0.5.</span> <span class="post-toc-text">高级配置项： https://webpack.toobug.net/zh-cn/chapter3/advanced-config.html</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#Loader"><span class="post-toc-number">1.4.</span> <span class="post-toc-text">Loader</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#使用Loader-https-webpack-toobug-net-zh-cn-chapter4-using-loaders-html"><span class="post-toc-number">1.4.0.1.</span> <span class="post-toc-text">使用Loader: https://webpack.toobug.net/zh-cn/chapter4/using-loaders.html</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#常用Loader"><span class="post-toc-number">1.4.0.2.</span> <span class="post-toc-text">常用Loader:</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#bundle-loader-https-webpack-toobug-net-zh-cn-chapter4-bundle-loader-html"><span class="post-toc-number">1.4.0.2.1.</span> <span class="post-toc-text">bundle-loader: https://webpack.toobug.net/zh-cn/chapter4/bundle-loader.html</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#exports-loader-https-webpack-toobug-net-zh-cn-chapter4-exports-loader-html"><span class="post-toc-number">1.4.0.2.2.</span> <span class="post-toc-text">exports-loader: https://webpack.toobug.net/zh-cn/chapter4/exports-loader.html</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#imports-loader-https-webpack-toobug-net-zh-cn-chapter4-imports-loader-html"><span class="post-toc-number">1.4.0.2.3.</span> <span class="post-toc-text">imports-loader: https://webpack.toobug.net/zh-cn/chapter4/imports-loader.html</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#expose-loader-https-webpack-toobug-net-zh-cn-chapter4-expose-loader-html"><span class="post-toc-number">1.4.0.2.4.</span> <span class="post-toc-text">expose-loader: https://webpack.toobug.net/zh-cn/chapter4/expose-loader.html</span></a></li></ol></li></ol></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#杂谈"><span class="post-toc-number">1.5.</span> <span class="post-toc-text">杂谈</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#TypeScript和Vue-https-webpack-toobug-net-zh-cn-chapter6-ts-and-vue-html"><span class="post-toc-number">1.5.0.1.</span> <span class="post-toc-text">TypeScript和Vue: https://webpack.toobug.net/zh-cn/chapter6/ts-and-vue.html</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#信息提供：-https-www-gitbook-com-book-toobug-webpack-guide"><span class="post-toc-number">1.5.0.1.1.</span> <span class="post-toc-text">信息提供： https://www.gitbook.com/book/toobug/webpack-guide</span></a></li></ol></li></ol></li></ol></li></ol></li></ol>
        </nav>
    </aside>
    
<article id="post-JavaScript模块化编程的发展历程"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">webpack1指南</h1>
        <div class="post-meta">
            <time class="post-time" title="2017-10-02 08:18:29" datetime="2017-10-02T00:18:29.349Z"  itemprop="datePublished">2017-10-02</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/gitbook释出/">gitbook释出</a></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h1 id="webpack1指南：-https-www-gitbook-com-book-toobug-webpack-guide"><a href="#webpack1指南：-https-www-gitbook-com-book-toobug-webpack-guide" class="headerlink" title="webpack1指南： https://www.gitbook.com/book/toobug/webpack-guide"></a>webpack1指南： <a href="https://www.gitbook.com/book/toobug/webpack-guide" target="_blank" rel="external">https://www.gitbook.com/book/toobug/webpack-guide</a></h1><h4 id="虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》-lt-gh-pages-on-github支持一个index-html文件-不提供同repo下的资源请求，我目前在摸索快速美观单页repo的高效部署；-又比如《UMD模块打包》，这里面有判断当前宿主js环境规范的经典实现，-编写跨规范js包可以直接拿来用；etc-）。"><a href="#虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》-lt-gh-pages-on-github支持一个index-html文件-不提供同repo下的资源请求，我目前在摸索快速美观单页repo的高效部署；-又比如《UMD模块打包》，这里面有判断当前宿主js环境规范的经典实现，-编写跨规范js包可以直接拿来用；etc-）。" class="headerlink" title="虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》&lt;gh-pages on github支持一个index.html文件,不提供同repo下的资源请求，我目前在摸索快速美观单页repo的高效部署； 又比如《UMD模块打包》，这里面有判断当前宿主js环境规范的经典实现， 编写跨规范js包可以直接拿来用；etc.）。"></a>虽然webpack1渐渐远去，但有些精巧的小项目是基于webpack1构建的，个人觉得还是有必要熟悉一下。一是为了避免重复早车轮，二是为了深入了解一些经典实现思想（比如《非模块化文件打包》&lt;gh-pages on github支持一个index.html文件,不提供同repo下的资源请求，我目前在摸索快速美观单页repo的高效部署； 又比如《UMD模块打包》，这里面有判断当前宿主js环境规范的经典实现， 编写跨规范js包可以直接拿来用；etc.）。</h4><h2 id="模块化：-https-webpack-toobug-net-zh-cn-chapter1"><a href="#模块化：-https-webpack-toobug-net-zh-cn-chapter1" class="headerlink" title="模块化： https://webpack.toobug.net/zh-cn/chapter1/"></a>模块化： <a href="https://webpack.toobug.net/zh-cn/chapter1/" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter1/</a></h2><h4 id="原始时代：-https-webpack-toobug-net-zh-cn-chapter1-ancient-times-html"><a href="#原始时代：-https-webpack-toobug-net-zh-cn-chapter1-ancient-times-html" class="headerlink" title="原始时代： https://webpack.toobug.net/zh-cn/chapter1/ancient-times.html"></a>原始时代： <a href="https://webpack.toobug.net/zh-cn/chapter1/ancient-times.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter1/ancient-times.html</a></h4><h4 id="命名空间时代：-https-webpack-toobug-net-zh-cn-chapter1-name-spacing-age-html"><a href="#命名空间时代：-https-webpack-toobug-net-zh-cn-chapter1-name-spacing-age-html" class="headerlink" title="命名空间时代： https://webpack.toobug.net/zh-cn/chapter1/name-spacing-age.html"></a>命名空间时代： <a href="https://webpack.toobug.net/zh-cn/chapter1/name-spacing-age.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter1/name-spacing-age.html</a></h4><h4 id="模块化时代：-https-webpack-toobug-net-zh-cn-chapter1-modular-age-html"><a href="#模块化时代：-https-webpack-toobug-net-zh-cn-chapter1-modular-age-html" class="headerlink" title="模块化时代： https://webpack.toobug.net/zh-cn/chapter1/modular-age.html"></a>模块化时代： <a href="https://webpack.toobug.net/zh-cn/chapter1/modular-age.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter1/modular-age.html</a></h4><h2 id="wepack入门：-https-webpack-toobug-net-zh-cn-chapter2"><a href="#wepack入门：-https-webpack-toobug-net-zh-cn-chapter2" class="headerlink" title="wepack入门： https://webpack.toobug.net/zh-cn/chapter2/"></a>wepack入门： <a href="https://webpack.toobug.net/zh-cn/chapter2/" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter2/</a></h2><h4 id="入口文件：-https-webpack-toobug-net-zh-cn-chapter2-entry-point-html"><a href="#入口文件：-https-webpack-toobug-net-zh-cn-chapter2-entry-point-html" class="headerlink" title="入口文件： https://webpack.toobug.net/zh-cn/chapter2/entry-point.html"></a>入口文件： <a href="https://webpack.toobug.net/zh-cn/chapter2/entry-point.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter2/entry-point.html</a></h4><h4 id="非模块化文件打包：https-webpack-toobug-net-zh-cn-chapter2-non-moduler-html"><a href="#非模块化文件打包：https-webpack-toobug-net-zh-cn-chapter2-non-moduler-html" class="headerlink" title="非模块化文件打包：https://webpack.toobug.net/zh-cn/chapter2/non-moduler.html"></a>非模块化文件打包：<a href="https://webpack.toobug.net/zh-cn/chapter2/non-moduler.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter2/non-moduler.html</a></h4><h4 id="AMD模块打包：-https-webpack-toobug-net-zh-cn-chapter2-amd-html"><a href="#AMD模块打包：-https-webpack-toobug-net-zh-cn-chapter2-amd-html" class="headerlink" title="AMD模块打包： https://webpack.toobug.net/zh-cn/chapter2/amd.html"></a>AMD模块打包： <a href="https://webpack.toobug.net/zh-cn/chapter2/amd.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter2/amd.html</a></h4><h4 id="Node模块和NPM：-https-webpack-toobug-net-zh-cn-chapter2-node-modules-and-npm-html"><a href="#Node模块和NPM：-https-webpack-toobug-net-zh-cn-chapter2-node-modules-and-npm-html" class="headerlink" title="Node模块和NPM： https://webpack.toobug.net/zh-cn/chapter2/node-modules-and-npm.html"></a>Node模块和NPM： <a href="https://webpack.toobug.net/zh-cn/chapter2/node-modules-and-npm.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter2/node-modules-and-npm.html</a></h4><h4 id="UMD模块打包：-https-webpack-toobug-net-zh-cn-chapter2-umd-html"><a href="#UMD模块打包：-https-webpack-toobug-net-zh-cn-chapter2-umd-html" class="headerlink" title="UMD模块打包： https://webpack.toobug.net/zh-cn/chapter2/umd.html"></a>UMD模块打包： <a href="https://webpack.toobug.net/zh-cn/chapter2/umd.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter2/umd.html</a></h4><h2 id="webpack进阶：-https-webpack-toobug-net-zh-cn-chapter3"><a href="#webpack进阶：-https-webpack-toobug-net-zh-cn-chapter3" class="headerlink" title="webpack进阶： https://webpack.toobug.net/zh-cn/chapter3/"></a>webpack进阶： <a href="https://webpack.toobug.net/zh-cn/chapter3/" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter3/</a></h2><h4 id="CLI与API使用模式：-https-webpack-toobug-net-zh-cn-chapter3-cli-api-html"><a href="#CLI与API使用模式：-https-webpack-toobug-net-zh-cn-chapter3-cli-api-html" class="headerlink" title="CLI与API使用模式： https://webpack.toobug.net/zh-cn/chapter3/cli-api.html"></a>CLI与API使用模式： <a href="https://webpack.toobug.net/zh-cn/chapter3/cli-api.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter3/cli-api.html</a></h4><h4 id="基本配置项：-https-webpack-toobug-net-zh-cn-chapter3-config-html"><a href="#基本配置项：-https-webpack-toobug-net-zh-cn-chapter3-config-html" class="headerlink" title="基本配置项： https://webpack.toobug.net/zh-cn/chapter3/config.html"></a>基本配置项： <a href="https://webpack.toobug.net/zh-cn/chapter3/config.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter3/config.html</a></h4><h4 id="分片：-https-webpack-toobug-net-zh-cn-chapter3-chunks-html"><a href="#分片：-https-webpack-toobug-net-zh-cn-chapter3-chunks-html" class="headerlink" title="分片： https://webpack.toobug.net/zh-cn/chapter3/chunks.html"></a>分片： <a href="https://webpack.toobug.net/zh-cn/chapter3/chunks.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter3/chunks.html</a></h4><h4 id="CommonChuncks插件：-https-webpack-toobug-net-zh-cn-chapter3-common-chunks-plugin-html"><a href="#CommonChuncks插件：-https-webpack-toobug-net-zh-cn-chapter3-common-chunks-plugin-html" class="headerlink" title="CommonChuncks插件： https://webpack.toobug.net/zh-cn/chapter3/common-chunks-plugin.html"></a>CommonChuncks插件： <a href="https://webpack.toobug.net/zh-cn/chapter3/common-chunks-plugin.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter3/common-chunks-plugin.html</a></h4><h4 id="高级配置项：-https-webpack-toobug-net-zh-cn-chapter3-advanced-config-html"><a href="#高级配置项：-https-webpack-toobug-net-zh-cn-chapter3-advanced-config-html" class="headerlink" title="高级配置项： https://webpack.toobug.net/zh-cn/chapter3/advanced-config.html"></a>高级配置项： <a href="https://webpack.toobug.net/zh-cn/chapter3/advanced-config.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter3/advanced-config.html</a></h4><h2 id="Loader"><a href="#Loader" class="headerlink" title="Loader"></a>Loader</h2><h4 id="使用Loader-https-webpack-toobug-net-zh-cn-chapter4-using-loaders-html"><a href="#使用Loader-https-webpack-toobug-net-zh-cn-chapter4-using-loaders-html" class="headerlink" title="使用Loader: https://webpack.toobug.net/zh-cn/chapter4/using-loaders.html"></a>使用Loader: <a href="https://webpack.toobug.net/zh-cn/chapter4/using-loaders.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter4/using-loaders.html</a></h4><h4 id="常用Loader"><a href="#常用Loader" class="headerlink" title="常用Loader:"></a>常用Loader:</h4><h5 id="bundle-loader-https-webpack-toobug-net-zh-cn-chapter4-bundle-loader-html"><a href="#bundle-loader-https-webpack-toobug-net-zh-cn-chapter4-bundle-loader-html" class="headerlink" title="bundle-loader: https://webpack.toobug.net/zh-cn/chapter4/bundle-loader.html"></a>bundle-loader: <a href="https://webpack.toobug.net/zh-cn/chapter4/bundle-loader.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter4/bundle-loader.html</a></h5><h5 id="exports-loader-https-webpack-toobug-net-zh-cn-chapter4-exports-loader-html"><a href="#exports-loader-https-webpack-toobug-net-zh-cn-chapter4-exports-loader-html" class="headerlink" title="exports-loader: https://webpack.toobug.net/zh-cn/chapter4/exports-loader.html"></a>exports-loader: <a href="https://webpack.toobug.net/zh-cn/chapter4/exports-loader.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter4/exports-loader.html</a></h5><h5 id="imports-loader-https-webpack-toobug-net-zh-cn-chapter4-imports-loader-html"><a href="#imports-loader-https-webpack-toobug-net-zh-cn-chapter4-imports-loader-html" class="headerlink" title="imports-loader: https://webpack.toobug.net/zh-cn/chapter4/imports-loader.html"></a>imports-loader: <a href="https://webpack.toobug.net/zh-cn/chapter4/imports-loader.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter4/imports-loader.html</a></h5><h5 id="expose-loader-https-webpack-toobug-net-zh-cn-chapter4-expose-loader-html"><a href="#expose-loader-https-webpack-toobug-net-zh-cn-chapter4-expose-loader-html" class="headerlink" title="expose-loader: https://webpack.toobug.net/zh-cn/chapter4/expose-loader.html"></a>expose-loader: <a href="https://webpack.toobug.net/zh-cn/chapter4/expose-loader.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter4/expose-loader.html</a></h5><h2 id="杂谈"><a href="#杂谈" class="headerlink" title="杂谈"></a>杂谈</h2><h4 id="TypeScript和Vue-https-webpack-toobug-net-zh-cn-chapter6-ts-and-vue-html"><a href="#TypeScript和Vue-https-webpack-toobug-net-zh-cn-chapter6-ts-and-vue-html" class="headerlink" title="TypeScript和Vue: https://webpack.toobug.net/zh-cn/chapter6/ts-and-vue.html"></a>TypeScript和Vue: <a href="https://webpack.toobug.net/zh-cn/chapter6/ts-and-vue.html" target="_blank" rel="external">https://webpack.toobug.net/zh-cn/chapter6/ts-and-vue.html</a></h4><h5 id="信息提供：-https-www-gitbook-com-book-toobug-webpack-guide"><a href="#信息提供：-https-www-gitbook-com-book-toobug-webpack-guide" class="headerlink" title="信息提供： https://www.gitbook.com/book/toobug/webpack-guide"></a>信息提供： <a href="https://www.gitbook.com/book/toobug/webpack-guide" target="_blank" rel="external">https://www.gitbook.com/book/toobug/webpack-guide</a></h5>
        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    Last updated: <time datetime="2017-12-05T08:11:59.536Z" itemprop="dateUpdated">2017-12-05 16:11:59</time>
</span><br>


        
        让文字梳理技能，用技能创造价值。
        
    </div>
    <footer>
        <a href="http://doc2git.com">
            <img src="/img/avatar.jpg" alt="doc2git">
            doc2git
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JS模块化编程的发展历程/">JS模块化编程的发展历程</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/jquery引入-missed/">jquery引入--missed</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/loader/">loader</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/ts/">ts</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/vue/">vue</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/webpack1，-入门/">webpack1， 入门</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/进阶/">进阶</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/集成gulp-missed/">集成gulp--missed</a></li></ul>


            
<div class="page-share-wrap">
    


<div class="page-share" id="pageShare">

    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/&title=《webpack1指南》 — icccc.cc   -   周瑜.com&pic=http://doc2git.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/&title=《webpack1指南》 — icccc.cc   -   周瑜.com&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《webpack1指南》 — icccc.cc   -   周瑜.com&url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/&via=http://doc2git.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/10/03/linux词典下载地址/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">linux词典下载地址</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/10/02/things_17.9.18-17.9.24/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">Todo-2017.10-week2</h4>
      </a>
    </div>
  
</nav>



    











</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        谢谢大爷~
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/img/wechat.jpg" alt="打赏二维码">
        </div>
        
        <label class="reward-toggle">
            <input id="rewardToggle" type="checkbox" class="reward-toggle-check"
                data-wechat="/img/wechat.jpg" data-alipay="/img/alipay.jpg">
            <div class="reward-toggle-ctrol">
                <span class="reward-toggle-item wechat">微信</span>
                <span class="reward-toggle-label"></span>
                <span class="reward-toggle-item alipay">支付宝</span>
            </div>
        </label>
        
    </div>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
            <span>This blog is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</span>
        </p>
    </div>
    <div class="bottom">
        <p><span>doc2git &copy; 2015 - 2017</span>
            <span>
                
                Power by <a href="http://doc2git.com.cn" target="_blank">doc2git</a> 
	<!--	Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a> -->
            </span>
	    <span>
		Tel <a href="javascript:;">15823170299</a>
	    </span>
        </p>
    </div>
</footer>



    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>




<div class="global-share" id="globalShare">

    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/&title=《webpack1指南》 — icccc.cc   -   周瑜.com&pic=http://doc2git.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/&title=《webpack1指南》 — icccc.cc   -   周瑜.com&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《webpack1指南》 — icccc.cc   -   周瑜.com&url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/&via=http://doc2git.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://doc2git.com/2017/10/02/JavaScript模块化编程的发展历程/" alt="微信分享二维码">
</div>




    <script src="/js/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="/js/main.min.js?v=1.6.14"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.6.14" async></script>






<script async src="/js/busuanzi.pure.min.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
